﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Sales_Data : System.Web.UI.Page
{
    ZSql zs = new ZSql();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            initData();
        }
    }
    private void initData()
    {
        string txt = "";
        if (!string.IsNullOrEmpty(Request["GuestName"]) || !string.IsNullOrEmpty(Request["Guesttel"]))
        {
            string sql = "";
                sql = "select * from CS_Mailadd where Guestname='" + Request["GuestName"] + "' or Guesttel='" + Request["Guesttel"]+"' ";
                zs.Open(sql);
                if (zs.m_table.Rows.Count > 0)
                {
                    txt += zs.m_table.Rows[0]["Guestname"].ToString();
                }
                zs.Close();
                Response.Write(txt);
            Response.End();
        }
    }
}
